<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>首写Promise</title>

    <script>

        const p = new Promise((resolve, reject) => {
            console.log('promise');
            resolve()
            console.log('promise is resolved');
        })

        p.then(r => {
            console.log('then1');
        }).then(r => {
            console.log('then1-then1');
        })

        p.then(r => {
            console.log('then2');
        })

        console.log('end');
        


    </script>

</head>

<body>

</body>

</html>